<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
        <form class="well form-search" method="get" action="{:U('Office/personnel')}">
            人员姓名:
            <input type="text" name="user_name" style="width: 100px;" value="{:I('request.user_name/s','')}" placeholder="请输入人员姓名">
            账号:
            <input type="text" name="user_login" style="width: 100px;" value="{:I('request.user_login/s','')}" placeholder="请输入人员账号">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('Office/personnel')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
                	<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
					<th>账号</th>
                    <th>姓名</th>
					<th>部门</th>
					<th>{:L('STATUS')}</th>
                    <!--<th>最后登录时间</th>
					<th >{:L('ACTIONS')}</th>-->
				</tr>
			</thead>
			<tbody>
				<php>$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));</php>
				<foreach name="users" item="vo">
				<tr>
                	<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.ad_id}"></td>
					<td><if condition="$vo['user_url']"><a href="{$vo.user_url}" target="_blank" title="{$vo.signature}">{$vo.user_login}</a><else />{$vo.user_login}</if></td>
                    <td>{$vo['user_name']}</td>
					<td>{$vo.department_name}</td>
					<td>{$user_statuses[$vo['user_status']]}</td>
                    <!--<td> {$vo.last_login_time}</td>
					<td>
						<if condition="$vo['id'] eq 1 || $vo['id'] eq sp_get_current_admin_id()">
						<font color="#cccccc">{:L('EDIT')}</font> | <font color="#cccccc">{:L('DELETE')}</font> 
						<else />
							<a href='{:U("user/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')} </a> |
							<a class="js-ajax-delete" href="{:U('user/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a> 
						</if>
                        |
                        <a href="{:U('user/resetpassword',array('id'=>$vo['id']))}">重置密码</a> 
					</td>-->
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
        <div class="form-actions">
            <button type="submit" class="btn btn-primary js-ajax-submit" id="check-btn">保存</button>
            <a class="btn" id="js-dialog-close" href="#">{:L('BACK')}</a>
        </div>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>
<script>
	$(function() {
		$("#check-btn").click(function() {
			$('#js-dialog-close').on('click', function (e) {
				e.preventDefault();
				try{
					art.dialog.close();
				}catch(err){
					Wind.use('artDialog','iframeTools',function(){
						art.dialog.close();
					});
				};
			});
		});

	});
</script>